function corrected_HRTFs = f_HRTF_wrap(bHRTFs)
corrected_HRTFs = bHRTFs;

for point = 1:5
    base = 1:5;
    base(point) = [];
    for i = 1:size(bHRTFs,1)
        if bHRTFs(i,point) - mean(mean(bHRTFs(:,base)))  > pi
            corrected_HRTFs(i,point) = corrected_HRTFs(i,point) - 2*pi;
        end
        if bHRTFs(i,point) - mean(mean(bHRTFs(:,base)))  < -pi
            corrected_HRTFs(i,point) = corrected_HRTFs(i,point) + 2*pi;
        end
    end
end
